package com.dc.auth.mapper;

import com.dc.auth.mapper.entity.DcAppInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface AppInfoMapper {

    @Insert("INSERT INTO `dc_app_info` VALUES (null,#{appName}, #{appId}, #{appSecret}, '0', null, null, null, null, null);")
    public int insertAppInfo(DcAppInfo meiteAppInfo);

    @Select("SELECT ID AS ID ,app_id as appId, app_name AS appName ,app_secret as appSecret  FROM dc_app_info where app_id=#{appId} and app_secret=#{appSecret}; ")
    public DcAppInfo selectByAppInfo(@Param("appId") String appId, @Param("appSecret") String appSecret);

    @Select("SELECT ID AS ID ,app_id as appId, app_name AS appName ,app_secret as appSecret  FROM dc_app_info where app_id=#{appId}  ")
    public DcAppInfo findByAppInfo(@Param("appId") String appId);
}